/* 
 * File:   PointIncProbDrawingStrategy.h
 * Author: root
 *
 * Created on December 8, 2008, 10:15 PM
 */

#ifndef _POINTINCPROBDRAWINGSTRATEGY_H
#define	_POINTINCPROBDRAWINGSTRATEGY_H

#include "DrawingStrategy.h"

class PointIncProbDrawingStrategy : public DrawingStrategy {
    
    int probabilityThreshold;
    int decisionCertainty;
    
protected:
    
    virtual void setExecutionParameter(int index, int rangeFraction) {
        // The execution parameter is the probability threshold
        probabilityThreshold = rangeFraction;
    }

    int calculateGain(CCardStack* hand, const CCard& card, bool picked, const GameState* gameState);

public:
    
    PointIncProbDrawingStrategy() 
    : DrawingStrategy(string("PointIncProbDrawingStrategy"), 1), probabilityThreshold(0), decisionCertainty(0) {}
    
    PointIncProbDrawingStrategy(int myWeight)
    : DrawingStrategy(myWeight), probabilityThreshold(0), decisionCertainty(0)
    {
    }
                
    virtual int getDecisionCertainty() {
        return decisionCertainty;
    }
    
    virtual Strategy* getActiveInstance(int inst_weight) {
        return dynamic_cast<Strategy*>(new PointIncProbDrawingStrategy(inst_weight));
    }
    
    virtual void opponentMove(int opponent, const Move& move) {}
    virtual bool pickFromDiscard (CCardStack*, const GameState*);

};

#endif	/* _POINTINCPROBDRAWINGSTRATEGY_H */

